<%@include file="/WEB-INF/common/taglibs.jsp"%>
<script type="text/javascript"
	src="${ctx}/resources/js/datatable-query.js"></script>
<script type="text/javascript" src="${supr}/js/widgets.js"></script>
<script type="text/javascript" src="${ctx}/resources/js/admin/shop.js"></script>
<script type="text/javascript" src="/ckfinder/ckfinder.js"></script>
<link href="${ctx}/resources/css/custom.css" type="text/css"
	rel="stylesheet" />

<script type="text/javascript">
	$(document).ready(
			function() {
				<c:forEach var="single" items="${entity.categories}">
				$("input[name='categoryIds'][value='${single.id}']").attr(
						"checked", "checked").uniform();
				</c:forEach>

			});
</script>
<div class="row-fluid">
	<form class="form-horizontal seperator" method="post">
		<div class="span12">
			<div class="box gradient">
				<div class="title">
					<h4>
						<span class="icon16 icomoon-icon-equalizer-2"></span> <span>Products</span>

					</h4>
					<a href="#" class="minimize">Minimize</a>
				</div>

				<div class="content">
					<ul id="myTab" class="nav nav-tabs pattern">
						<li class="active"><a href="#general" data-toggle="tab">General</a></li>
						<li><a href="#identity" data-toggle="tab">Identity</a></li>
						<li><a href="#data" data-toggle="tab">Data</a></li>
						<li><a href="#unit" data-toggle="tab">Unit</a></li>
						<li><a href="#links" data-toggle="tab">Links</a></li>
						<li><a href="#reward" data-toggle="tab">Reward Points</a></li>
						<li><a href="#stockTab" data-toggle="tab">Stock</a></li>
						
						<c:if test="${entity ne null }">
							<li><a href="#attribute" data-toggle="tab">Attribute</a></li>
							<li><a href="#option" data-toggle="tab">Option</a></li>
							<li><a href="#discount" data-toggle="tab">Discount</a></li>
							<li><a href="#imageTab" data-toggle="tab">Image</a></li>
							<li><a href="#downloadTab" data-toggle="tab">Download</a></li>
						</c:if>
					</ul>


					<div class="tab-content tab-content-no-border">
						<%@ include file="sub/general.jsp"%>
						<%@ include file="sub/identity.jsp"%>
						<%@ include file="sub/unit.jsp"%>
						<div class="tab-pane fade" id="data">
							<!--price -->
				
							<!--taxClass -->
							<div class="form-row row-fluid">
								<div class="span12">
									<div class="row-fluid">
										<label class="form-label span3">Tax Class :</label>
										<div class="span4 controls">
											<select name="taxClassId"><c:if
													test="${not empty taxClasses}">
													<c:forEach var="single" items="${taxClasses}">
														<option value="${single.id}"
															${(single.id == entity.taxClass.id)?'selected':'' }>${single.name}</option>
													</c:forEach>
												</c:if></select>
										</div>
									</div>
								</div>
							</div>
							
							<!--newArrive -->
							<div class="form-row row-fluid">
								<div class="span12">
									<div class="row-fluid">
										<label class="form-label span3" for="newArrive">New
											Arrive :</label>
										<div class="left marginT5 marginR10">
											<div class="normal-toggle-button">
												<input
													<c:if test= "${entity.newArrive}"> checked=checked</c:if>
													type="checkbox" class="nostyle" fname="newArrive">
												<input class="nostyle" type="radio" name="newArrive"
													id="newArrive1" value="true"
													<c:if test= "${entity.newArrive}"> checked=checked</c:if>
													style="opacity: 0;"> <input class="nostyle"
													type="radio" name="newArrive" id="newArrive2" value="false"
													<c:if test= "${!entity.newArrive}"> checked=checked</c:if>
													style="opacity: 0;">
											</div>
										</div>
									</div>
								</div>
							</div>

			 

							<!--quantityUnitGroup -->

 

							<!--requireShipping -->
							<div class="form-row row-fluid">
								<div class="span12">
									<div class="row-fluid">
										<label class="form-label span3" for="requireShipping">Require
											Shipping :</label>
										<div class="left marginT5 marginR10">
											<div class="normal-toggle-button">
												<input
													<c:if test= "${entity.requireShipping}"> checked=checked</c:if>
													type="checkbox" class="nostyle" fname="requireShipping">
												<input class="nostyle" type="radio" name="requireShipping"
													id="requireShipping1" value="true"
													<c:if test= "${entity.requireShipping}"> checked=checked</c:if>
													style="opacity: 0;"> <input class="nostyle"
													type="radio" name="requireShipping" id="requireShipping2"
													value="false"
													<c:if test= "${!entity.requireShipping}"> checked=checked</c:if>
													style="opacity: 0;">
											</div>
										</div>
									</div>
								</div>
							</div>

 							<div class="form-row row-fluid">
								<div class="span12">
									<div class="row-fluid">
										<label class="form-label span3" for="dateAvailable">Date
											Available:</label><input class="span4 datepicker" id="dateAvailable"
											name="dateAvailable" type="text"
											value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.dateAvailable}" />" />
									</div>
								</div>
							</div>
	
							<!--status -->
							<div class="form-row row-fluid">
								<div class="span12">
									<div class="row-fluid">
										<label class="form-label span3" for="status">Status :</label>
										<div class="left marginT5 marginR10">
											<div class="normal-toggle-button">
												<input
													<c:if test= "${entity.status}"> checked=checked</c:if>
													type="checkbox" class="nostyle" fname="status"> <input
													class="nostyle" type="radio" name="status" id="status1"
													value="true"
													<c:if test= "${entity.status}"> checked=checked</c:if>
													style="opacity: 0;"> <input class="nostyle"
													type="radio" name="status" id="status2" value="false"
													<c:if test= "${!entity.status}"> checked=checked</c:if>
													style="opacity: 0;">
											</div>
										</div>
									</div>
								</div>
							</div>

						</div>
 						<%@ include file="sub/link.jsp"%>
						<%@ include file="sub/reward.jsp"%>
						<%@ include file="sub/stock.jsp"%>
						
						<c:if test="${entity ne null }">

							<%@ include file="sub/attr.jsp"%>
							<%@ include file="sub/discount.jsp"%>
							<%@ include file="sub/image.jsp"%>
							<%@ include file="sub/option.jsp"%>
							<%@ include file="sub/download.jsp"%>






						</c:if>
					</div>

				</div>
				<div class="form-row row-fluid">
					<div class="span12">
						<div class="row-fluid">
							<div class="form-actions">
								<div class="span3"></div>
								<div class="span4 controls">
									<button type="submit" class="btn btn-info marginR10">Save
										changes</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

		</div>
		<!-- End .span6 -->
	</form>
</div>

<!-- End .row-fluid -->
<%@include file="model-div.jsp"%>
<c:if test="${entity ne null }">

	<script>
$(document).ready(function(){
$(".meta-div").appendTo($("#general"));
});


var meta_type="product";
</script>
	<c:set var="showName" value="true" />
	<%@include file="../../admin/meta/meta.jsp"%>
</c:if>




